home *** CD-ROM | disk | FTP | other *** search
/ Motor Sport Digital Archive Collection 1960s / Motor Sport Digital Archive Collection 1960s.iso / main.swf / scripts / mx / events / ValidationResultEvent.as < prev   
Encoding:
Text File  |  2008-05-21  |  1.4 KB  |  54 lines

  1. package mx.events
  2. {
  3.    import flash.events.Event;
  4.    import mx.core.mx_internal;
  5.    
  6.    use namespace mx_internal;
  7.    
  8.    public class ValidationResultEvent extends Event
  9.    {
  10.       mx_internal static const VERSION:String = "2.0.1.0";
  11.       
  12.       public static const INVALID:String = "invalid";
  13.       
  14.       public static const VALID:String = "valid";
  15.       
  16.       public var results:Array;
  17.       
  18.       public var field:String;
  19.       
  20.       public function ValidationResultEvent(param1:String, param2:Boolean = false, param3:Boolean = false, param4:String = null, param5:Array = null)
  21.       {
  22.          super(param1,param2,param3);
  23.          this.field = param4;
  24.          this.results = param5;
  25.       }
  26.       
  27.       public function get message() : String
  28.       {
  29.          var _loc1_:String = null;
  30.          var _loc2_:int = 0;
  31.          var _loc3_:int = 0;
  32.          _loc1_ = "";
  33.          _loc2_ = int(results.length);
  34.          _loc3_ = 0;
  35.          while(_loc3_ < _loc2_)
  36.          {
  37.             if(results[_loc3_].isError)
  38.             {
  39.                _loc1_ += _loc1_ == "" ? "" : "\n";
  40.                _loc1_ += results[_loc3_].errorMessage;
  41.             }
  42.             _loc3_++;
  43.          }
  44.          return _loc1_;
  45.       }
  46.       
  47.       override public function clone() : Event
  48.       {
  49.          return new ValidationResultEvent(type,bubbles,cancelable,field,results);
  50.       }
  51.    }
  52. }
  53.  
  54.